//
//  SmalPosterViewCelll.m
//  项目1 CLCMovie
//
//  Created by huiwenjiaoyu on 15/7/25.
//  Copyright (c) 2015年 CLC. All rights reserved.
//

#import "SmalPosterViewCelll.h"
#import "UIViewExt.h"
#import "UIImageView+WebCache.h"


@implementation SmalPosterViewCelll


- (id)initWithFrame:(CGRect)frame
{
    self = [super initWithFrame:frame];
    
    if (self) {
        
        _PosterImageView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, self.width, self.height)];

        [self.contentView addSubview:_PosterImageView];
        
        
    }
    return self;
}
- (void)setIndex:(NSInteger)index
{
    _index = index;
    [self setNeedsLayout];
}

- (void)setModal:(HomeModal *)modal
{
    _modal = modal;

    [self setNeedsLayout];
    
}

- (void)layoutSubviews{
    [super layoutSubviews];
    

    NSString* str = [_modal.images valueForKey:@"large"];
    [_PosterImageView sd_setImageWithURL:[NSURL URLWithString:str]];
    
}

@end
